import {defineStore} from "pinia";
import {basicRoutes} from "@/router/routes";


export const usePermissionStore = defineStore('permission',{
    state:()=>{
        return{
            accessRoutes:[],
        }
    },
    getters:{
        routes:(state):any=>{
          return basicRoutes.concat(state.accessRoutes)
        },
        menus() {
            // @ts-ignore
            return this.routes.filter((route:any)=>route.name && !route.isHidden)

        },
    },
    actions:{

    }

})
